home *** CD-ROM | disk | FTP | other *** search
/ Top 200 Programs / Top 200 Programs.iso / Bob8 / THOMPSON / LIBERTY / PRODUCT / LB14W.EXE / NEW14.TXT < prev    next >
Text File  |  1997-03-25  |  11KB  |  306 lines

  1.  
  2. Changes to Liberty BASIC v1.4 (stuff added since v1.3)
  3. ------------------------------------------------------------------------
  4.  
  5. First, the new stuff in summary!
  6.  
  7. * Added communications support!
  8. * Added user preferences dialog!
  9. * Added support for block IF/THEN/ELSE/ENDIF structures!
  10. * Added command lines switches so you can use the editor of
  11.   your choice!
  12. * Added font support to most controls!
  13. * Added auto-backup of your work when running/debugging!
  14. * Added a compile progress bar!
  15.  
  16. ...and more!
  17.  
  18.  
  19. Here are the new features and bug fixes in more detail!
  20.  
  21. 1) FIXED! Wrong line highlighted when unfinished string compile
  22.    error occurs.
  23.  
  24. 2) FIXED! Floating point values lose their fractional part when
  25.    reading from a random access file.
  26.  
  27. 3) Added a TITLEBAR statement to change the label of a program's
  28.    main window.
  29.  
  30.     titlebar "A new title!"
  31.  
  32. 4) Added the AUTORESIZE command to textedit and graphicbox
  33.    controls so that they can automatically resize themselves when
  34.    their parent window resizes.  When a control is sent this
  35.    command, each edge of a control will maintain the same distance
  36.    from its parent window's respective edge.
  37.  
  38. 5) The random number generator now automatically reseeds when
  39.    Liberty BASIC starts.
  40.  
  41. 6) FIXED!  An 'index out of range' error to occur when using the
  42.    MID$() function in certain unusual circumstances
  43.    has been fixed.  This also improves performance of the function.
  44.  
  45. 7) Sometimes when enlarging a window with graphics drawn in it,
  46.    Liberty BASIC would fail to completely refill then entire window
  47.    with a chosen fill color.  This has been fixed.
  48.  
  49. 8) Added the ability to define a default pushbutton for a dialog
  50.    type window.  By specifying a button with a handle extension of
  51.    .default, that button will become the default pushbutton for
  52.    the dialog box in which it resides.  NOTE: The default
  53.    pushbutton cannot be placed inside of a groupbox.
  54.  
  55.    'example of setting up a default pushbutton
  56.    button #main.default, "OK", [accept], UL, 10, 10, 50, 25
  57.  
  58. 9) Added a Preferences dialog to the Setup menu containing:
  59.  
  60.    - option to confirm on exit of Liberty BASIC
  61.    - option to display execution complete notice
  62.    - option to add Kill BASIC Programs to system menu of all windows
  63.    - option to start Liberty BASIC as full screen
  64.    - option to show a compile progress dialog
  65.  
  66. 10) Now when making a *.TKN file a file dialog will open and let you
  67.     change the default destination filename.
  68.  
  69. 11) Now you can change the text label of a button by printing to it:
  70.  
  71.       button #1.bttn, "Click me", [ok], UL, 10, 10, 150, 25
  72.       open "test" for window as #1
  73.       input r$
  74.  
  75.   [ok]
  76.       count = count + 1
  77.       print #1.bttn, "Clicked "; count; " times."
  78.       input r$
  79.  
  80. 12) Block IF/THEN support added.  IF/THEN blocks can be nested, and
  81. two formats are supported:
  82.  
  83.     a = 5
  84.     if a = 5 then
  85.         print "variable"
  86.         print "a is 5"
  87.     else
  88.         print "these lines"
  89.         print "will not execute"
  90.     end if
  91.  
  92. alternatively:
  93.  
  94.     a = 5
  95.     if a = 5 then
  96.         print "variable"
  97.         print "a is 5"
  98.     end if
  99.  
  100. Nested blocks are permitted:
  101.  
  102.     a = 5
  103.     if a = 5 then
  104.         confirm "Display whether a is 5?"; answer$
  105.         if answer$ = "yes" then
  106.             print "variable"
  107.             print "a is 5"
  108.         end if
  109.     else
  110.         print "these lines"
  111.         print "will not execute"
  112.     end if
  113.  
  114. 13) FIXED! If a delsegment command fails, a proper error message is
  115.    now presented.
  116.  
  117. 14) Communications support has been added...
  118.  
  119. 15) The INPUT$() function has been revamped and is now much faster.
  120.  
  121. 16) The !contents commands for text windows and texteditor controls
  122.    now has a new form that requires less code when reading a file
  123.    straight into the control.
  124.  
  125.    'previous form (still works)
  126.    open "filename.txt" for input as #1
  127.    h$ = input$(#1, lof(#1))
  128.    print #win.te, "!contents h$";
  129.    close #1
  130.  
  131.    'new form (less code and much faster)
  132.    open "filename.txt" for input as #1
  133.    'see how we specify the file handle instead of a string variable
  134.    print #win.te, "!contents #1";
  135.    close #1
  136.  
  137. 17) Setting up a FOR/NEXT loop that counts backwards and would never
  138.    reach its limit would simply skip over the loop when running in
  139.    the development environment, but when running a *.TKN file it 
  140.    would bomb (even using the runtime engine).  This has been fixed.
  141.    Here is an example of a loop that would bomb in v1.3:
  142.  
  143.     for x = 1 to 0
  144.       {some code}
  145.     next x
  146.  
  147. 18) Added the ability to set the label for a prompter dialog using
  148.    the same method as for a notice dialog like so:
  149.  
  150.    prompt "This is the title" + chr$(13) + "Enter something"; a$
  151.  
  152. 19) Fixed a bug that would sometimes produce an error:
  153.  
  154.    'syncControlEvent: not understood by BasicGraphPane'
  155.  
  156. 20) Added a CommandLine$ variable that contains the parameter 
  157.    contents of the command line.
  158.  
  159. 21) Added some startup options to LIBERTY.EXE including:
  160.  
  161.  -R Run a BAS file on startup
  162.  -D Debug a BAS file on startup
  163. --------the following three are in the registered version only--------
  164.  -T Make a TKN file from a BAS file on startup
  165.  -A Automatically Exit LB on completion of BAS file
  166.  -M Minimize the Liberty BASIC editor on startup
  167.  
  168.  Examples:
  169.  
  170.   LIBERTY -R -M PROG.BAS     'run PROG.BAS with editor minimized
  171.   LIBERTY -T -A PROG.BAS     'create a TKN file from PROG.BAS then exit
  172.   LIBERTY -D PROG.BAS        'run the debugger on PROG.BAS
  173.  
  174. 22) FIXED!  LB would report the following error if the developer tried
  175.    to build a window with a groupbox that contains one or more
  176.    graphicbox controls:
  177.  
  178.    "y" not understood by UndefinedObject
  179.  
  180.    Additionally, the bug would also cause the following error to be 
  181.    reported when the user exits Liberty BASIC (or LB would stop
  182.    responding to user input altogether):
  183.  
  184.    "assignByName:toBe:" not understood by UndefinedObject
  185.  
  186. 23) Made some changes to the way the unsaved changes and quit
  187.    confirmation dialogs work and the way they are presented when
  188.    quitting Liberty BASIC.
  189.  
  190. 24) FIXED! The common file dialogs would be improperly initialized on
  191.    startup with incorrect default pathname info.  This caused a few
  192.    subtle problems.
  193.  
  194. 25) Changed the way that strings are passed into API calls.  By
  195.    default, Liberty BASIC copies a string and adds a terminating
  196.    ASCII zero to the copy.  Most Windows API calls expect this kind
  197.    of zero terminated string.  The problem was though that since only
  198.    a copy of the original string was passed to the API function, if
  199.    the function then modifies that string directly (as in the kernel
  200.    API function GetProfileString and a few others), then the Liberty
  201.    BASIC application calling the function could not access the modified
  202.    string because only the copy is modified.
  203.  
  204.    The way to fix this now is to write code that adds the ASCII zero
  205.    onto the end of the string before making the call.  Liberty BASIC
  206.    then checks for the ASCII zero, and if it finds it, passes the
  207.    original string and does not make a copy.  This is only necessary if
  208.    your application passes a string, expecting to get it back modified
  209.    by the API or DLL function called.
  210.  
  211.    Here is a quick snippet to get printer info using the
  212.    GetProfileString API call:
  213.  
  214.  
  215.     'getpstr.bas - Get information using the GetProfileString API call
  216.  
  217.     open "kernel.dll" for dll as #kernel
  218.  
  219.     appName$ = "windows"
  220.     keyName$ = "device"
  221.     default$ = ""
  222.  
  223.     'add an ASCII zero so Liberty BASIC will not pass a copy of result$
  224.     'into the API call, but the actual contents of result$
  225.     result$ = space$(49)+chr$(0)
  226.     size = 50
  227.  
  228.     calldll #kernel, "GetProfileString",_
  229.         appName$ as ptr,_
  230.         keyName$ as ptr,_
  231.         default$ as ptr,_
  232.         result$ as ptr,_
  233.         size as short,_
  234.         result as short
  235.  
  236.     close #kernel
  237.  
  238.     'display the retrieved information up to but not including the
  239.     'terminating ASCII zero
  240.     print left$(result$, instr(result$, chr$(0)) - 1)
  241.  
  242.     input r$
  243.  
  244. 26) FIXED! When using random access files, using PUT to save one or
  245.    more records and then using GET without first closing the file and
  246.    reopening it could cause some loss of data.  Liberty BASIC now
  247.    properly flushes file buffers correctly before permitting GET to be
  248.    used after PUT.
  249.  
  250. 27) FIXED! A bug was fixed that caused all texteditor panes in the
  251.    same window to adopt the font specified by the font command.
  252.  
  253. 28) Font control was added to the following controls: TEXTBOX, BUTTON,
  254.    STATICTEXT, CHECKBOX, RADIOBUTTON.
  255.  
  256. 29) The runtime engine will now run a TKN file matching the name of the
  257.    runtime engine.  If you rename your runtime engine ULTIPROG.EXE and
  258.    name your TKN file ULTIPROG.TKN, then the runtime engine will
  259.    execute ULTIPROG.TKN on startup.  NOTICE:  To retain compatibility
  260.    with LB v1.3 the runtime engine will first look for and run
  261.    STARTUP.TKN if it is there.
  262.  
  263. 30) Added a Setup option to backup your source code to a *.bak file.
  264.    This comes in handy when calling Windows API functions or when using
  265.    third party DLLs.  When you run (or debug) with this option checked,
  266.    Liberty BASIC will save your code in its current state in a *.bak
  267.    file.  Then if Liberty BASIC crashes, your code will be saved to a
  268.    *.bak file from which you can recover your work.
  269.  
  270. 31) Added INP() for reading a byte from a I/O port, and OUT for sending
  271.    a byte to an I/O port.  These use the same syntax as those in
  272.    Microsoft BASICs.  NOTICE: It is considered somewhat reckless to use
  273.    these inside of Windows because there is no way to control who is
  274.    reading or writing to an I/O port.
  275.  
  276. 32) Added a SPACE$() function.  This function returns the specified
  277.    number of ASCII 32 characters in a string.  For example:
  278.  
  279.     for x = 1 to 10
  280.         print space$(x); "*"
  281.     next x
  282.  
  283. 33) FIXED! Bolstered syntax checking in assignment statements.  For
  284.    example, compiling the following would halt without highlighting
  285.    the errant line, and it would produce a cryptic error "attempt to
  286.    access an absent element".  Now it properly highlights the line and
  287.    produces a syntax error notification.
  288.  
  289.     for x = 1 to 10
  290.         print space$(x)); "*"
  291.     next x
  292.  
  293. 34) Added a HEXDEC function that converts a hexadecimal number
  294.    expressed in a string into a decimal numeric value.  This can be
  295.    very useful when converting #defines in header files from C or some
  296.    other language for use in Liberty BASIC.
  297.  
  298.    Here's a hypothetical example:
  299.  
  300.     REDRAW.SPECIAL = hexdec("0A")
  301.     PAL.AUTO       = hexdec("01")
  302.     stylebits = REDRAW.SPECIAL or PAL.AUTO
  303.  
  304.  
  305.  
  306.